#include<iostream>
#include<memory>
#include"SmartPtr.h"
using namespace std;

class A
{
public:
	A(int a=0)
		:_a(a)
	{
		cout << "A(int a)" << endl;
	}
	~A()
	{
		cout << this << endl;
		cout << "~A()" << endl;
	}
	void print()
	{
		cout << "hello" << endl;
	}
private:
	int _a;
};

int main()
{
	//auto_ptr<A> ptr1(new A(1));
	//auto_ptr<A> ptr2(new A(2));
	//auto_ptr<A> ptr3(ptr1);

	fertilizer::shared_ptr<A> ptr1(new A(1));
	fertilizer::shared_ptr<A> ptr2(new A(2));
	fertilizer::shared_ptr<A> ptr3(ptr1);

	ptr2 = ptr1;
	//ptr1->print();






	return 0;
}